var app = new Vue({
	el: '#app',
	mixins: [isLogin],
	components: {
		login: login,
		footers:footer,
	},
	data: {
		showNavModal:false,//控制首页的导航弹窗
		keyWord: '', //搜索关键字
	},
	methods: {
		//header组件的搜索方法
		searchHeader(searchCtx) {

		},
		//点击搜索按钮
		searchBtn: function() {
			if(this.keyWord) {
				location.href = 'searchList.html?keyWord=' + this.keyWord;
			} else {
				location.href = 'search.html';
			}
		},
		//手机端点击切换导航
		mobileTapNav:function(){
			this.showNavModal = true;
		},
		//手机端点击隐藏导航
		hideMobileNav:function(event){
			var isModal = $(event.target).hasClass('xs-modal');
			if(isModal){
				this.showNavModal = false;
			}
		},
		//点击热门搜索关键字
		clickHotKeyWord: function(hotWord) {
			if(hotWord) {
				location.href = 'searchList.html?keyWord=' + hotWord;
			}
		},
	},
	mounted() {
		
	},
	updated() {

	}
})